package com.zdd.ehe.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zdd.ehe.entity.Permission;
import com.zdd.ehe.entity.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhuiZhu
 * @since 2023-03-13
 */
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    /**
     * 分页获取角色权限
     * @param page
     * @return
     */
    Page<RolePermission> getAllRolePermissionByPage(Page<RolePermission> page);

    List<RolePermission> getAllByRoleName(String roleName);

    List<Integer> getPermissionIdByRoleId(int roleId);
}
